package com.tony.mindhr.mapper;

import com.tony.mindhr.model.Employee;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 *
 * @Title: EmployeeMapper
 * @Auther: 皮蛋布丁
 * @Date: 2021/04/19/14:03
 * @Description:
 */
public interface EmployeeMapper {

    /**
    * @Description: deleteByPrimaryKey 根据id删除员工信息
    * @Param: [id]
    * @return: int
    * @Author: 皮蛋布丁
    */
    int deleteByPrimaryKey(Integer id);

    /**
    * @Description: insert 插入员工信息
    * @Param: [record]
    * @return: int
    * @Author: 皮蛋布丁
    */
    int insert(Employee record);

    /**
    * @Description: insertSelective 有选择性的插入员工信息
    * @Param: [record]
    * @return: int
    * @Author: 皮蛋布丁
    */
    int insertSelective(Employee record);

    /**
    * @Description: selectByPrimaryKey 根据id查询员工信息
    * @Param: [id]
    * @return: com.tony.mindhr.model.Employee
    * @Author: 皮蛋布丁
    */
    Employee selectByPrimaryKey(Integer id);

    /**
    * @Description: updateByPrimaryKeySelective 根据id有选择性的更新员工信息
    * @Param: [record]
    * @return: int
    * @Author: 皮蛋布丁
    */
    int updateByPrimaryKeySelective(Employee record);

    /**
    * @Description: updateByPrimaryKey 根据id更新员工信息
    * @Param: [record]
    * @return: int
    * @Author: 皮蛋布丁
    */
    int updateByPrimaryKey(Employee record);

    /**
    * @Description: getEmployeeByPage 获取员工列表信息(分页)
    * @Param: [page, size]
    * @return: java.util.List<com.tony.mindhr.model.Employee>
    * @Author: 皮蛋布丁
    * @Date: 2021/6/13 21:26
    */
    List<Employee> getEmployeeByPage(@Param("page") Integer page, @Param("size") Integer size,
                                     @Param("emp") Employee employee,@Param("beginDateScope")
                                     Date[] beginDateScope);

    /**
    * @Description: getTotal 获取员工总数
    * @Param: []
    * @return: java.lang.Long
    * @Author: 皮蛋布丁
    * @Date: 2021/6/13 21:27
     * @param beginDateScope
    */
    Long getTotal(@Param("emp") Employee employee,@Param("beginDateScope")
            Date[] beginDateScope);

    /**
    * @Description: maxworkID 获取最大工号
    * @Param: []
    * @return: java.lang.Integer
    * @Author: 皮蛋布丁
    * @Date: 2021/6/14 21:08
    */
    Integer maxworkID();

    Integer addEmps(@Param("list") List<Employee> list);
}
